package com.spingweb.service.serviceImpl;

import com.spingweb.dto.Book;
import com.spingweb.mapper.BookMapper;
import com.spingweb.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {
    @Autowired
    BookMapper bookMapper;

    @Override
    public boolean add(Book book) {
        return bookMapper.add(book);
    }

    @Override
    public boolean delete(long id) {
        return bookMapper.delete(id);
    }

    @Override
    public boolean update(Book book) {
        return bookMapper.update(book);
    }

    @Override
    public List<Book> query(Book book) {
        return bookMapper.query(book);
    }

    @Override
    public Book getOne(long id) {
        return bookMapper.getOne(id);
    }
}
